
'use strict';
// 系统 交易 记录表
module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING, DATE, ENUM } = Sequelize;
    // 创建表
    await queryInterface.createTable('xi-profit', {
      id: {
        type: INTEGER(30).UNSIGNED,
        primaryKey: true,
        autoIncrement: true
      },
      content: {
        type: STRING(2000),
        allowNull: false,
        defaultValue: '0',
        comment: '内容',
      },
      code: {
        type: STRING(200),
        allowNull: false,
        defaultValue: 0,
        comment: '编号',
      },
      price: {
        type: STRING(200),
        allowNull: false,
        defaultValue: '',
        comment: '交易金额',
      },
      created_at: DATE,
      updated_at: DATE,
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.dropTable('xi-profit');
  }
};